<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org/extras/dialect"
      layout:decorate="layout/layout_info"
>
<head>
	<title>申请新应用</title>
	<meta charset="utf-8"/>
	<link rel="stylesheet" href="../../static/asset/css/base.min.css" th:href="@{/asset/css/base.min.css}"/>
	<link rel="stylesheet" href="../../static/asset/css/common/front.css" th:href="@{/asset/css/common/front.css}"/>
	<link rel="stylesheet" href="../../static/asset/css/back/login.css" th:href="@{/asset/css/back/login.css}"/>
</head>
<body>
<div layout:fragment="content">

	<div class="container">

		<div class="row no-gutters">

			<div class="col-md-12">

				<div class="card my-4">
					<div class="card-header">
						应用申请
					</div>
					<div class="card-body">
						<form th:action="@{/client/apply}" method="post" th:object="${model}">
							<div class="form-group row">
								<label for="logo" class="col-sm-2 col-form-label">应用 Logo</label>
								<div class="col-sm-10">
									<input type="file" class="form-control" id="logo" name="logo">
								</div>
							</div>
							<div class="form-group row">
								<label for="name" class="col-sm-2 col-form-label">应用名称</label>
								<div class="col-sm-10">
									<input class="form-control" id="name" name="name" placeholder="应用名称"
									       required data-msg-required="不能为空">
									<div class="form-control-feedback text-danger"></div>
								</div>
							</div>
							<div class="form-group row">
								<label for="name" class="col-sm-2 col-form-label">应用编号</label>
								<div class="col-sm-10">
									<input class="form-control" id="clientId" name="clientId" placeholder="应用编号"
									       required data-msg-required="不能为空">
									<div class="form-control-feedback text-danger"></div>
								</div>
							</div>
							<div class="form-group row">
								<label for="description" class="col-sm-2 col-form-label">应用介绍</label>
								<div class="col-sm-10">
									<textarea class="form-control" id="description" name="description" data-rule-maxLength="10" data-msg-maxLength="最大长度不能超过{0}"></textarea>
								</div>
							</div>
							<!--<div class="form-group row">-->
								<!--<label for="scope" class="col-sm-2 col-form-label">申请 scopes</label>-->
								<!--<div class="col-sm-10">-->
									<!--<input class="form-control" id="scope" name="scope">-->
								<!--</div>-->
							<!--</div>-->
							<div class="form-group row">
								<label for="email" class="col-sm-2 col-form-label">联系邮箱</label>
								<div class="col-sm-10">
									<input class="form-control" id="email" name="email" placeholder="联系邮箱" th:field="*{email}"
									       required data-rule-email="true" data-msg-email="不是有效的邮箱地址" data-msg-required="不能为空">
									<div class="form-control-feedback text-danger" th:errors="*{email}"></div>
								</div>
							</div>
							<div class="form-group row">
								<label for="registeredRedirectUri" class="col-sm-2 col-form-label">回调地址</label>
								<div class="col-sm-10">
									<input class="form-control" id="registeredRedirectUri" name="registeredRedirectUri" placeholder="回调地址" th:field="*{registeredRedirectUri}"
									       required data-rule-email="true" data-msg-email="不是有效的邮箱地址" data-msg-required="不能为空">
									<div class="form-control-feedback text-danger" th:errors="*{registeredRedirectUri}"></div>
								</div>
							</div>
							<div class="form-group row">
								<label for="changedNotifyUrl" class="col-sm-2 col-form-label">用户变更通知地址</label>
								<div class="col-sm-10">
									<input class="form-control" id="changedNotifyUrl" name="changedNotifyUrl" placeholder="用户变更通知地址">
								</div>
							</div>


							<div class="row">
								<div class="offset-sm-2 col-sm-10">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<th:block layout:fragment="script">
	<script type="text/javascript" src="../../static/asset/js/base.min.js" th:src="@{/asset/js/base.min.js}"></script>
	<script type="text/javascript" src="../../static/asset/js/app.js" th:src="@{/asset/js/app.js}"></script>
</th:block>
</body>
</html>
